#-------------------------------------------------
#
# Project created by QtCreator 2020-11-11T21:22:27
#
#-------------------------------------------------

QT  += core sql xml network concurrent multimedia gui-private serialport

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = MainTain
TEMPLATE = app

# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS QT_MESSAGELOGCONTEXT
INCLUDEPATH += Window
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

#QMAKE_CXXFLAGS +=  -Wno-unused-parameter

PRECOMPILED_HEADER += \
    myhelper.h \
    Console/tables.h \
    Console/config.h \
    Console/sqlbase.h \
    globaldata.h \
    Console/myobject.h \

DEFINES += COMPILE_UI

contains(DEFINES, COMPILE_UI) {
    message("COMPILE_GUI")

    QT += gui charts xlsx axcontainer winextras

    HEADERS += \
        Window/mygui.h \
        Window/Charts/u_chart.h \
        Window/Charts/u_chartview.h \
        Window/Charts/u_quality_history_chart.h \
        Window/Charts/u_quality_time_chart.h \
        Window/Common/cardpanel.h \
        Window/Common/dialog.h \
        Window/Common/messagebox.h \
        Window/Common/messagetip.h \
        Window/Common/statetool.h \
        Window/Common/musicplayer.h \
        Window/Common/volumebutton.h \
        Window/mywidget.h \
        Window/mydialog.h \
        Window/u_menubar.h \
        Window/u_statusbar.h \
        Window/u_mainpage.h \
        Window/mainwindow.h \
        Window/qwe.h \
        Window/qantenna.h \
        Window/System/u_syslog_page.h \
        Window/System/u_user_page.h \
        Window/System/u_userlogin_page.h \
        Window/System/u_userpwd_page.h \
        Window/System/u_equipment_edit.h \
        Window/System/u_equipment_page.h \
        Window/System/u_config_system.h \
        Window/Data/u_quality_page.h \
        Window/Data/u_quality_alarm_page.h \
        Window/Data/u_channel_panel.h \


    SOURCES += \
        main-ui.cpp \
        Window/Charts/u_chart.cpp \
        Window/Charts/u_chartview.cpp \
        Window/Charts/u_quality_history_chart.cpp \
        Window/Charts/u_quality_time_chart.cpp \
        Window/Common/cardpanel.cpp \
        Window/Common/dialog.cpp \
        Window/Common/messagebox.cpp \
        Window/Common/messagetip.cpp \
        Window/Common/statetool.cpp \
        Window/Common/musicplayer.cpp \
        Window/Common/volumebutton.cpp \
        Window/mainwindow.cpp \
        Window/qwe.cpp \
        Window/qantenna.cpp  \
        Window/mywidget.cpp \
        Window/mydialog.cpp \
        Window/u_menubar.cpp \
        Window/u_statusbar.cpp \
        Window/u_mainpage.cpp \
        Window/System/u_syslog_page.cpp \
        Window/System/u_user_page.cpp \
        Window/System/u_userlogin_page.cpp \
        Window/System/u_userpwd_page.cpp \
        Window/System/u_equipment_edit.cpp \
        Window/System/u_equipment_page.cpp \
        Window/System/u_config_system.cpp \
        Window/Data/u_quality_page.cpp \
        Window/Data/u_quality_alarm_page.cpp \
        Window/Data/u_channel_panel.cpp \

}else{

    CONFIG += c++11 console
    CONFIG -= app_bundle

    SOURCES += \
        main.cpp \
}

SOURCES += \
    globaldata.cpp \
    Console/myobject.cpp \
    Console/config.cpp \
    Console/sqlbase.cpp \
    Console/tables.cpp \
    Console/Http/JQNet.cpp \
    Console/Http/JQHttpServer.cpp \
    Console/Server/HttpServer.cpp \
    Console/Server/WebApi.cpp \
    Console/Server/SerialPort.cpp \
    Console/Task/TaskManager.cpp \
    Console/Task/TaskDataDelete.cpp \
    Console/Task/TaskReceiver.cpp \
    Console/Task/TaskQuality.cpp \
    agreement.cpp \
    Window/System/realtimedata.cpp \
    Window/System/realtimedata.cpp \
    Window/Data/u_quailty_sim.cpp \
    Console/Task/taskipclient.cpp \
    Window/System/ippage.cpp \
    Window/System/u_ip_edit.cpp

HEADERS += \
    mylog.h \
    myhelper.h \
    globaldata.h \
    Console/myobject.h \
    Console/config.h \
    Console/sqlbase.h \
    Console/tables.h \
    Console/Http/JQNet.h \
    Console/Http/JQHttpServer.h \
    Console/Http/JQDeclare.hpp \
    Console/Server/HttpServer.h \
    Console/Server/WebApi.h \
    Console/Server/SerialPort.h \
    Console/Task/TaskManager.h \
    Console/Task/TaskDataDelete.h \
    Console/Task/TaskReceiver.h \
    Console/Task/TaskQuality.h \
    agreement.h \
    Window/System/realtimedata.h \
    Window/System/realtimedata.h \
    Window/Data/u_quailty_sim.h \
    Console/Task/taskipclient.h \
    Window/System/ippage.h \
    Window/System/u_ip_edit.h


RESOURCES += \
    res/res.qrc \

RC_FILE += \
    res/version.rc

FORMS += \
    Window/mainwindow.ui
